import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

//封装全局登录检查函数
Vue.prototype.checkLogin = function (backage, backtype) {
	var SUID = uni.getStorageSync('SUID')
	var SRAND = uni.getStorageSync('SRAND')
	var SNAME = uni.getStorageSync('SNAME')
	var SFACE = uni.getStorageSync('SFACE')
	if (SUID ==""||SRAND ==""||SFACE =="") {
		uni.redirectTo({
			url: '../../login/login?backage='+backage+"&backtype="+backtype
		})
		return false
	}
	//登录成功返回一个数组
	return [SUID, SRAND, SNAME, SFACE]
}

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
